package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.service.ITravelViewCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("travelsviewcount")
public class TravelViewCountController {
    @Autowired
    private ITravelViewCountService travelViewCountService;

    //根据travelID 新增浏览次数
    @PutMapping("/{id}")
    public void list(@PathVariable Long id){
            travelViewCountService.addViewCountByTravelId(id);
    }

}
